
export default {
  data() {

    //获取本地存储的图片路径
    return {
      share: {
        title: "分享",
        path: "/pages/index/index",
        // imgUrl: "../static/logo/logo.png",
      },
    };
  },
  // 分享给好友
  onShareAppMessage() {
    // const currentRoute = getCurrentPages()[getCurrentPages().length - 1].route;
    // if (currentRoute === "pages/index/activity/detail/index") {
    //   return {
    //     title: "投票系统",
    //     path: this.share.path,
    //     imageUrl: uni.getStorageSync("imagePath"),
    //   };
    // } else {
      return {
        title: "投票系统",
        path: this.share.path,
      };
    // }
  },
  // 转发到朋友圈功能
  onShareTimeline() {
    return {
      title: "投票系统", // 分享的标题
      query: "",
    };
  },
};
